package test1028;

public class Myexce {
    public static void main(String[] args) {
        int re = div(3,0);
        System.out.println("计算的结果为" + re);
    }

    public static int div(int x, int y){
        int z = 0;
        try {
            z = x / y;
        }catch(Exception e){
            System.out.println("做除法计算时发生错误信息： "+ e.getMessage());
        }

        return z;
    }
}
